﻿using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
using BenchmarkDotNet.Running;
using KafkaPush.Sample;
using System;

namespace BenchMarking.Sample
{
    class Program
    {
        static void Main(string[] args)
        {
            BenchmarkRunner.Run<TestContext>();

            //BenchmarkRunner.Run<KafkaProducerContext>();

            Console.ReadLine();
        }
    }

    //[SimpleJob(RuntimeMoniker.CoreRt31)]
    //[SimpleJob(RuntimeMoniker.CoreRt22)]
    //[SimpleJob(BenchmarkDotNet.Engines.RunStrategy.ColdStart, targetCount: 10)]
    //[MinColumn, MaxColumn, MeanColumn, MedianColumn]
    //[SimpleJob(2, 5, 10)]
    public class TestContext
    {
        [Benchmark]
        public void TestMD5()
        {
            SecurityHelper.GetMD5("https://www.baidu.com/img/bd_logo1.png");
        }

        [Benchmark]
        public void TestSHA1()
        {
            SecurityHelper.GetSHA1("https://www.baidu.com/img/bd_logo1.png");
        }
    }
}
